<template>
  <router-view></router-view>
</template>

<style>
/* 全局基础样式 */
:root {
  --primary-blue: #2c6ccf;
  --accent-blue: #3a86ff;
  --light-blue: #4a9df6;
  --success: #27ae60;
  --danger: #e74c3c;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --border-color: #e1ecf7;
  --text-dark: #2c3e50;
  --text-light: #5a7ea9;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body, #app {
  height: 100%;
  width: 100%;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8fbfe; /* 医疗系统浅蓝色背景 */
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f0f7ff;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--light-blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}

/* 全局卡片样式 */
.global-card {
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  background-color: var(--white);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.global-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* 全局按钮样式 */
.el-button {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.el-button--primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
  border: none;
}

.el-button--primary:hover {
  background: linear-gradient(135deg, #2558b0, #1c63b9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 108, 207, 0.25);
}

.el-button--success {
  background: linear-gradient(135deg, var(--success), #2ecc71);
  border: none;
}

.el-button--danger {
  background: linear-gradient(135deg, var(--danger), #c0392b);
  border: none;
}

/* 全局表格样式 */
.el-table {
  --el-table-border-color: var(--border-color);
  --el-table-border: 1px solid var(--el-table-border-color);
  --el-table-text-color: var(--text-dark);
  --el-table-header-text-color: var(--white);
  --el-table-row-hover-bg-color: #f0f7ff;
  --el-table-current-row-bg-color: #e6f2ff;
  --el-table-header-bg-color: var(--primary-blue);
  --el-table-fixed-box-shadow: 0 2px 8px rgba(74, 157, 246, 0.15);
  --el-table-bg-color: var(--white);
  --el-table-tr-bg-color: var(--white);
  --el-table-expanded-cell-bg-color: #f8fbfe;
  --el-table-fixed-left-column: inset 10px 0 10px -10px rgba(74, 157, 246, 0.1);
  --el-table-fixed-right-column: inset -10px 0 10px -10px rgba(74, 157, 246, 0.1);
  --el-table-index: var(--el-index-normal);
  border-radius: 8px;
  overflow: hidden;
}

.el-table th.el-table__cell {
  font-weight: 600;
}

/* 头像上传组件 */
.avatar-uploader .el-upload {
  border: 2px dashed #a3c8f0;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 178px;
  height: 178px;
  transition: all 0.3s ease;
  background-color: #f0f7ff;
}

.avatar-uploader .el-upload:hover {
  border-color: var(--light-blue);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(74, 157, 246, 0.15);
}

.avatar-uploader .avatar {
  max-width: 178px;
  max-height: 178px;
  border-radius: 6px;
}

.el-icon.avatar-uploader-icon {
  font-size: 32px;
  color: #a3c8f0;
  width: 178px;
  height: 178px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 分页组件样式 */
.el-pagination {
  --el-pagination-bg-color: var(--white);
  --el-pagination-button-disabled-bg-color: #f5f7fa;
  --el-pagination-hover-color: var(--light-blue);
  padding: 16px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
  border-radius: 6px;
}

/* 对话框样式 */
.el-dialog {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background: linear-gradient(to bottom, #ffffff, #f8fbfe);
  overflow: hidden;
}

.el-dialog__header {
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
  padding: 20px;
  margin: 0;
}

.el-dialog__title {
  color: var(--white);
  font-weight: 600;
  font-size: 18px;
}

.el-dialog__headerbtn .el-dialog__close {
  color: var(--white);
}

.el-dialog__body {
  padding: 25px;
}

/* 表单样式 */
.el-form-item__label {
  font-weight: 500;
  color: var(--text-dark);
}

.el-input__wrapper {
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 1px var(--border-color) inset;
}

.el-input__wrapper:hover {
  box-shadow: 0 0 0 1px var(--light-blue) inset;
}

.el-input__wrapper.is-focus {
  box-shadow: 0 0 0 2px var(--light-blue) inset;
}

/* 消息通知样式 */
.el-notification {
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.el-notification__title {
  font-weight: 600;
}

/* 加载动画 */
.el-loading-spinner .path {
  stroke: var(--light-blue);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .el-dialog {
    width: 90% !important;
    margin-top: 5vh !important;
  }

  .global-card {
    border-radius: 10px;
  }
}
</style>